package com.lotusfall.controller;

import com.lotusfall.vo.SchoolInfo;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class BootController {
    @Value("${school.name}")
    String sch;

    @Resource // 先byName  再byType
    private SchoolInfo info;

    @RequestMapping("/hello2")
    @ResponseBody
    public String doSome(){
        return "hello2 SpringBoot" + info.toString();
    }
}
